package lab02.Test11;

/**
 * Created by ASUS on 2017/10/25.
 */
public class Square extends Rectangle {
    double c;
    Square (double width,double height){

    }
    public double getDiagonal(){
        c=Math.sqrt(width*height+height*height);
        return c;
    }
    public void printMyWay(){
        System.out.println("面积："+getArea());
        System.out.println("周长："+getAroundLong());
        System.out.println("对角线："+getDiagonal());
    }
}
